1. Field of the Invention
The present invention relates to an apparatus of transmitting packets, and more particularly to a statistics information collection method and a load balancing method.
2. Description of Related Art
Due to advanced communication service using Internet such as electronic commerce and video distribution, an increase in an amount of traffic and speedup of communication speed have been rapidly advancing. In keeping with these, the throughput of communication apparatuses such as routers and servers within the network has been becoming further higher. For this reason, it has become a pressing need to improve the throughput of the communication apparatuses. In, for example, the WWW (World Wide Web) service, access to specified servers has increased, and in order to cover the processing with a single server, there arise cases where the capacity is insufficient.
Also, in order to implement Virtual Private Network (VPN) service using Internet, it is necessary to perform higher layer processing to be performed in units of packets to be transmitted and received in conformity with the communication speed. As the higher layer processing, there are named encryption, firewall processing and the like.
As regards the packet transfer method, there have been proposed various methods. There are, for example, transfer using Ethernet (registered trademark) frame stipulated by IEEE802.3, transfer using Tag VLAN stipulated by IEEE802.1Q, transfer using MPLS (Multi-Protocol Label Switching) stipulated by IETF RFC3032, and transfer using RPR (Resilient Packet Ring) that is being standardized by the IEEE802.17 committee. These are all packet transfer methods using Ethernet, and in addition, there are various packet transfer methods depending upon the communication method.
As one of techniques for improving the processing capacity of the communication apparatus, there is a load balancing technique. The load balancing technique is a method of reducing the throughput of each single apparatus and improving the processing capacity as a whole by providing a plurality of apparatuses, each having the same function and allotting a portion of the processing to each among these apparatuses.
Through the use of the load balancing technique, it becomes possible to improve fault tolerance in addition to the improvement of the processing capacity. In other words, even when one of those apparatuses suffers a breakdown, the remaining apparatuses take over the processing for thereby making it possible to continue the operation.
The load balancing is divided into load balancing aimed at distributing the throughput within the apparatus and load balancing aimed at distributing the throughput of other apparatuses (for example, server) connected to the apparatus.
In order to implement the load balancing, it is necessary to properly allocate packets to a plurality of apparatuses targeted for the load balancing for transferring.
As a first method for implementing allocation of packets, there is a method using Round Robin. The method using Round Robin is a method for allocating the packets to apparatuses different from one another in the order received.
As a second method for implementing allocation of packets, there is a method of allocating packets in accordance with a hash value in the header information. The method using the hash value is a method to determine an allocation target of the packet in accordance with a value (hash value) obtained by calculating a hash function with header information representing a flow, for example, a pair of a source IP address and destination IP address of the packet as an argument.
As a third method for implementing allocation of packets, there is a method using a filtering table. The method using the filtering table is a method to prepare for a flow and a table for bringing a packet of the flow into correspondence with the allocation target in advance, and to determine the allocation target of the packet by retrieving the table with information representing the flow indicated on the packet header as the search key on receipt of the packet.
In the packet allocation using the round robin, it is possible to comparatively uniformly distribute the packets to the allocation targets because they are allocated in the order of arrival of the packets. Since, however, there may occur a difference in time required for processing such as delay time due to packet transfer, the problem is that the order of packets which an apparatus targeted for the load balancing has received may be different from the order of packets which the aforementioned load balancing target transmits in the same flow (for example, a pair of source address and destination address) which poses a problem. As a method of solving the aforementioned problem, there is a method in which a sequence number is imparted to an internal header to be imparted to a packet when the packet is received, and the packet is transmitted in the order of the sequence number when the packet is transmitted. When, however, a number of flows increases, processing of sequence number management becomes complicated, which poses a problem.
In the method using the hash value, since the hash value becomes the same in the same flow, the packets are to be transmitted in the order of the packets received in the same flow. When there are many specified flows, however, the method using the hash value has a problem that the packets may not always be uniformly allocated.
In the method using the filtering table, it is necessary to register a flow in advance. Also, with fluctuations in traffic pattern for each flow, there is a possibility that the packet allocation targets are one-sided, which poses a problem.